import { adminPostJson } from '@/api/apiTool'

//登录
export function adminLogin(data, success, showMsg = false) {
    let url = "/admin/Admin/login"
    adminPostJson(url, data, success, showMsg)
}

//获取注册验证码
export function getRegisterEmailCaptcha(data, success, showMsg = false) {
    let url = "/admin/Admin/getRegisterEmailCaptcha"
    adminPostJson(url, data, success, showMsg)
}

//注册
export function adminRegist(data, success, showMsg = false) {
    let url = "/admin/Admin/regist"
    adminPostJson(url, data, success, showMsg)
}

//获取用户列表
export function getUserList(data, success, showMsg = false) {
    let url = "/admin/User/getUserList"
    adminPostJson(url, data, success, showMsg)
}

//重设用户信息
export function resetUserMsg(data, success, showMsg = false) {
    let url = "/admin/User/resetUserMsg"
    adminPostJson(url, data, success, showMsg)
}

//禁用用户
export function banUser(data, success, showMsg = false) {
    let url = "/admin/User/banUser"
    adminPostJson(url, data, success, showMsg)
}

//私信列表
export function getMsgList(data, success, showMsg = false) {
    let url = "/admin/User/getMsgList"
    adminPostJson(url, data, success, showMsg)
}

//删除私信
export function deleteMsg(data, success, showMsg = false) {
    let url = "/admin/User/deleteMsg"
    adminPostJson(url, data, success, showMsg)
}

//网站总信息
export function loadStatisData(data, success, showMsg = false) {
    let url = "/admin/Admin/loadStatisData"
    adminPostJson(url, data, success, showMsg)
}

//修改管理员密码
export function editAdminPassword(data, success, showMsg = false) {
    let url = "/admin/User/editAdminPassword"
    adminPostJson(url, data, success, showMsg)
}

//修改oss
export function editOss(data, success, showMsg = false) {
    let url = "/admin/User/editOss"
    adminPostJson(url, data, success, showMsg)
}

//获取oss
export function getOssMsg(data, success, showMsg = false) {
    let url = "/admin/User/getOssMsg"
    adminPostJson(url, data, success, showMsg)
}